package com.bluebridgecup.javabasics;

import java.util.Arrays;
import java.util.Scanner;

public class OptimalSorting {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }
        // 时间复杂度O(nlogn)
        // 默认升序
        Arrays.sort(a);
        for (int x : a) {
            System.out.print(x + " ");
        }
    }
}

